<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>apk管理</title>
	<link rel="stylesheet" href="/css/common2.css">
<link rel="stylesheet" href="/scriptZIP/layui.min.css">
</head>

<body class="main-body">

	<div id="vue-root" style="margin-top: 50px;">
		<div class="add action-buttons">
			<a href="apk_item.html" style="color: white">添加应用</a>
		</div>
		<div class="table ">
			<table class="table_top">
				<thead>
					<tr>
						<th class="one">
							<input type="checkbox" class="check-box" v-model="all">序号
						</th>
						<th>应用名称</th>
						<th>appid</th>
						<th>包名</th>
						<th>最新版本</th>
						<th>最新发布时间</th>
						<th>编辑/删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(apk,index) in list" :key="apk.id">
						<td>
							<input type="checkbox" class="check-box" v-model="apk.checked">
							<span v-text="index+1"></span>
						</td>
						<td v-text="apk.name"></td>
						<td v-text="apk.id"></td>
						<td v-text="apk.pkgName"></td>
						<td v-text="apk.version"></td>
						<td v-text="apk.time"></td>
						<td>
							<a :href="'apk_ver.html?id='+apk.id">
								<button>管理</button>
							</a>
							<a :href="'apk_item.html?id='+apk.id">
								<button>编辑</button>
							</a>

							<button @click="del([apk.id])">删除</button>
						</td>
					</tr>
				</tbody>
			</table>
		</div>

		<div class="delete" @click="batchDelete">批量删除</div>

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>

	</div>

	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>
	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>

		var app = new Vue(merge({
			data: {
				urls: {
					list: '/pc/apk',
					del: '/pc/apk/del'
				},
			},
			methods: {

			}
		}));
	</script>
</body>

</html>